<form onsubmit="return false;" action="{:request()->url()}" data-auto="true" method="post" class='layui-form layui-card' autocomplete="off">

    <div class="layui-card-body">

        <div class="layui-form-item">
            <label class="layui-form-label">保险类型</label>
            <div class="layui-input-block">
            <select class="layui-select" name="insurance" required>
            	<option value="">请选择保险类型</option>
				{foreach $insurances as $k=>$v}               
                <option value="{$k}">{$v}</option>
                {/foreach}
            </select>
            </div>
        </div>
        
        <div class="layui-form-item" >
            <label class="layui-form-label">截止日期</label>
            <div class="layui-input-block">
                <input data-date-input="" name="end_date" value="" required readonly
                placeholder="请选择"
                class="layui-input" autocomplete="off">
            </div>
        </div>  
    </div>

    <div class="layui-form-item text-center" style="padding-left:40px">
		<button class="layui-btn layui-btn-cancel" type='button' data-close>取消</button>
        <button class="layui-btn" type='submit'>确定</button>
      	<input type="hidden" name="increase_id" id="increase_id" value="{$id}" />
    </div>

    <script>
    	window.form.render();
        
        //限制截止日期为上月及以后
        var endDate = laydate.render({
            elem: 'input[name="end_date"]',
            format: 'yyyy-MM-dd',
            type:'date',
            min:getFirstOfLastMonth(),
            done: function (value) {
                $(this.elem).val(value).trigger('change');
            }
        });

    </script>
</form>
<style>
    body .layui-layer-content input[name='end_date'] {
        border: 1px solid #e5e5e5;
        background:#fff;
        cursor:pointer
    }
    body .layui-layer-content input[name='end_date']:focus {
        border: 1px solid #e5e5e5 !important
    }

</style>